<?php
/*
 * Created on Aug 10, 2009
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 
	 define ('HOSTNAME', 'http://web101.a1.rest.chat.sp1.yahoo.com/v1/'); 
	$url = HOSTNAME.'session' ;
	echo($_COOKIE["Y"]); exit(0);
	
	$cookies = "Y=".$_COOKIE["Y"]."; T=".$_COOKIE["T"]."; B=".$_COOKIE["B"];
	 
	 
	// Open the Curl session
	$session = curl_init($url);
	   
	// Don't return HTTP headers. Do return the contents of the call
	curl_setopt($session, CURLOPT_HEADER, false);
	curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
	curl_setopt($session, CURLOPT_COOKIE, $cookies); 
	
	// Make the call
	$xml  = simplexml_load_string( curl_exec($session) );
	
	// The web service returns XML. Set the Content-Type appropriately
	//header("Content-Type: text/xml");
	
	$crumb = $xml->crumb;
	echo($crumb);
	curl_close($session);
?>
